package com.lemote.action.order;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.lemote.action.BaseAction;
import com.lemote.entity.RepairReport;
import com.lemote.exception.AppException;
import com.lemote.service.order.OrderService;
import com.lemote.service.order.RepairReportService;



/**
 * 
 * @author slaton
 * @time 2011-7-16 上午10:47:04
 * @Version:0.0.1
 * @since smt
 */
@Component("repairReportAction")
public class RepairReportAction extends BaseAction<RepairReport, RepairReportService> {

	private RepairReport repairReport;
	
	
	public RepairReport getRepairReport() {
		return repairReport;
	}

	public void setRepairReport(RepairReport repairReport) {
		this.repairReport = repairReport;
	}

	@Override
	public RepairReport getModel() {
		
		return repairReport;
	}

	@Override
	public String list() throws AppException {
		
		return null;
	}

	@Override
	public String input() throws AppException {
		
		return null;
	}

	@Override
	public String save() throws AppException {
		entityService.add(repairReport);
		return GLOBALSUCCESS;
	}

	@Override
	public String delete() throws AppException {
		
		return null;
	}

	@Override
	public void prepareModel() throws AppException {
		
		if (id!=null) {
			repairReport = entityService.get(id);
		}else {
			repairReport = new RepairReport();
		}
		
	}

	@Autowired
	@Override
	public void setEntityService(RepairReportService entityService) {
		
		
	}

}
